mod imp;

use glib::{clone, Object};
use gio::SimpleAction;
use gtk::{gio, glib};
use adw::Window;
use adw::prelude::ActionMapExt;


glib::wrapper!{
    pub struct NoteWindow(ObjectSubclass<imp::NoteWindow>)
	@extends adw::Window, gtk::Window, gtk::Widget,
    @implements gio::ActionGroup, gio::ActionMap, gtk::Accessible, gtk::Buildable,
    gtk::ConstraintTarget, gtk::Native, gtk::Root, gtk::ShortcutManager;
}

impl NoteWindow {
    pub fn new() -> Self {
	Object::builder().build()
    }

//    fn setup_actions(&self) {
//	let menu_preferences = SimpleAction::new("menu_preferences", None);
//	menu_preferences.connect_activate(clone!( @weak self as win => move |_,_| { 
//	    println!("clicked menu preferences");
//	}));
//
//	self.add_action(&menu_preferences);
//
//	let menu_about = SimpleAction::new("menu_about", None);
//	menu_about.connect_activate(clone!( @weak self as win => move |_,_| { 
//	    println!("clicked menu about");
//	}));
//
//	self.add_action(&menu_about);
//
//	let note_menu_edit = SimpleAction::new("note_menu_edit", None);
//	note_menu_edit.connect_activate(clone!( @weak self as win => move |_,_| { 
//	    println!("clicked note menu edit");
//	}));
//
//	self.add_action(&note_menu_edit);
//
//	let note_menu_delete = SimpleAction::new("note_menu_delete", None);
//	note_menu_delete.connect_activate(clone!( @weak self as win => move |_,_| { 
//	    println!("clicked note menu delete");
//	}));
//
//	self.add_action(&note_menu_delete);
//	
//	let new_note = SimpleAction::new("new_note", None);
//	new_note.connect_activate(clone!( @weak self as win => move |_,_| { 
//	    println!("clicked new note");
//	}));
//
//	self.add_action(&new_note);
//    }
//

}
